package com.collect;

import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;

public class CollectionTest {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Table<Integer, String, Integer> user = HashBasedTable.create();
        user.put(1, "longhao", 29);

        user.put(1, "shuaige", 29);

        user.put(2, "xiaomi", 1);

        user.put(3, "soso", 3);

        System.out.println(user.containsColumn("soso"));// true

        System.out.println(user.containsColumn("3"));// false

        System.out.println(user.contains(1, "xiaomi"));// false

        System.out.println(user.contains(1, "shuaige"));// true

        System.out.println(user.row(1));// {shuaige=29, longhao=29}
        System.out.println();
        System.out.println();
    }

}
